package com.hziee.mail.model;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "user_info", schema = "mall", catalog = "")
public class UserInfoEntity {
    private int userId;
    private String phone;
    private String pwd;
    private String userRealName;
    private String cardId;
    private String userPro;
    private String headImg;
    private String motto;

    @Id
    @Column(name = "user_id")
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "pwd")
    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    @Basic
    @Column(name = "user_real_name")
    public String getUserRealName() {
        return userRealName;
    }

    public void setUserRealName(String userRealName) {
        this.userRealName = userRealName;
    }

    @Basic
    @Column(name = "card_id")
    public String getCardId() {
        return cardId;
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    @Basic
    @Column(name = "user_pro")
    public String getUserPro() {
        return userPro;
    }

    public void setUserPro(String userPro) {
        this.userPro = userPro;
    }

    @Basic
    @Column(name = "head_img")
    public String getHeadImg() {
        return headImg;
    }

    public void setHeadImg(String headImg) {
        this.headImg = headImg;
    }

    @Basic
    @Column(name = "motto")
    public String getMotto() {
        return motto;
    }

    public void setMotto(String motto) {
        this.motto = motto;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        UserInfoEntity that = (UserInfoEntity) o;
        return userId == that.userId &&
                Objects.equals(phone, that.phone) &&
                Objects.equals(pwd, that.pwd) &&
                Objects.equals(userRealName, that.userRealName) &&
                Objects.equals(cardId, that.cardId) &&
                Objects.equals(userPro, that.userPro) &&
                Objects.equals(headImg, that.headImg) &&
                Objects.equals(motto, that.motto);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userId, phone, pwd, userRealName, cardId, userPro, headImg, motto);
    }
}
